<template>
  <div class="header-title">
  <div class="back" @click="backHandler"><i class="iconfont">&#xe63a;</i></div>
    <div class="title-field">{{$route.meta.title}}</div>
    <div><i class="iconfont">&#xe61b;</i></div>
  </div>
</template>

<script>
export default {
  name: 'HeaderTitle',
  data() {
    return {
      title: '页面标题'
    }
  },
  created() {
    console.log(this)
  },
  methods: {
    backHandler() {
      this.$router.back()
    }
  }
}
</script>

<style lang="scss" scoped>
 .header-title {
    display: flex;
    align-items: center;
    height: 40px;
    background-color: #fdde4a;
    .back {
      width: 60px;
      text-align: center;
    }
    .title-field {
      flex: 1;
    }
  }
</style>
